package com.mars.miaosha.exception;

import com.mars.miaosha.result.CodeMsg;

/**
 * 自定义全局异常(业务异常),拦截的都是运行时的异常
 * @author MARS
 * @date 2018/5/8
 */
public class GlobalException extends RuntimeException {

    private CodeMsg cm;

    public GlobalException(CodeMsg cm){
        super(cm.toString());
        this.cm = cm;
    }

    public CodeMsg getCm() {
        return cm;
    }
}
